import request from '@/utils/request'

//数据库备份新增
export function addBackItem(data) {
  return request({
    url: '/cqbc/daback/addBackItem',
    method: 'POST',
    data: data
  })
}
//数据库备份列表
export function getBackDaLists(query) {
  return request({
    url: '/cqbc/daback/getBackDaLists',
    method: 'GET',
    params: query
  })
}
//删除
export function deleteBack(id) {
  return request({
    url: '/cqbc/daback/deleteBack?bakId='+id,
    method: 'GET',
  })
}

//数据库备份详情
export function dabackDetail(id) {
  return request({
    url: '/cqbc/daback/detail/'+id,
    method: 'GET',
  })
}
//备份
export function backDa(data) {
  return request({
    url: '/cqbc/daback/backDa',
    method: 'POST',
    data:data
  })
}

//修改
export function editItem(data) {
  return request({
    url: '/cqbc/daback/editItem',
    method: 'POST',
    data:data
  })
}

//测试是否能连接
export function checkConn(query) {
  return request({
    url: '/cqbc/daback/checkConn',
    method: 'GET',
    params:query
  })
}